package com.engine4cloud.tdf.education.feign;

import com.engine4cloud.tdf.common.core.constant.SecurityConstants;
import com.engine4cloud.tdf.common.core.constant.ServiceNameConstants;
import com.engine4cloud.tdf.common.core.util.R;
import com.engine4cloud.tdf.common.data.web.response.PageInfo;
import com.engine4cloud.tdf.education.dto.query.EduStudentTaskAppQueryDTO;
import com.engine4cloud.tdf.education.dto.result.EduStudyTaskResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "RemoteEduStudentTaskService", value = ServiceNameConstants.EDUCATION_SERVER)
public interface RemoteEduStudentTaskService {

    /**
     * 矫正对象学习任务列表
     *
     * @return R<PageInfo < EduStudyTaskResultDTO>>
     */
    @PostMapping("/inner/student/task/page")
    R<PageInfo<EduStudyTaskResultDTO>> pageList(@RequestBody EduStudentTaskAppQueryDTO dto, @RequestHeader(SecurityConstants.FROM) String from);

    /**
     * 通过id查询
     *
     * @param id 矫正对象id
     * @return R<List < EduStudyTaskResultDTO>>
     */
    @GetMapping("/inner/student/task/{id}")
    R<EduStudyTaskResultDTO> getById(@PathVariable Long id, @RequestHeader(SecurityConstants.FROM) String from);
}
